\fi-420\li420 Q: How can my program tell whether it is running on a system with a color screen? How can I tell whether I'm running on the 12-bit NextStation Color or the 24-bit NextDimension?\
\fi0\li0 \
\fi-440\li440 A: The PostScript graphics model allows you to do all your rendering in 24-bit color, and have the window server display it in the best way possible (dithering it down to 2-bits, if necessary). If there are situations in which you need to use the "inquire and adapt" approach, the Appkit provides you with a method in the Application class called
\b colorScreen
\b0 that returns the most colorful screen available to your application. By examining this data structure, you can determine how deep your color screen is. Below is a code fragment that does this:\
\fi-340\li340 Q: How can I tell whether a View can display color or not?\
\fi0\li0 \
\fi-380\li380 A: The above question does not answer which kinds of rendering commands you should be sending for a given View. There are two headed systems, and other circumstances where the window you are drawing in is not based on the value of
\b colorScreen
\b0 . The most common thing you want to do is different rendering based on whether this View can display color or not. One way to do this is to use the
\b shouldDrawColor
\b0 method of View. Do the following in your drawSelf:: method for the View:\